<div class="container-fluid">
<style type="text/css">
.from{float:left;clear:both;margin-bottom:10px;}
.from1{float:left; margin-left:20px; margin-top:0px; padding-right:15px; clear:both; max-width:300px;}
.to{float:right;clear:both;margin-bottom:10px;}
.to1{float:right; margin-right:20px; margin-top:0px; padding-right:15px; clear:both; max-width:300px;}
</style>
	<div class="row-fluid">
		<div class="span2">
		    <ul class="nav nav-tabs nav-stacked">
				<li class="active"><a href="/letter/index">未处理消息</a></li>
				<li><a href="/letter/send">发送消息	</a></li>
				<!--<li><a href="/letter/recycle">回收站</a></li>-->
				<li><a href="/letter/history">历史消息</a></li>
            </ul>		    
		</div>
       <div class="span10" style="position: relative">
        <button class="btn btn-primary " onClick="window.location.href='/<*$controller*>/index'">返回</button>          
       
        <fieldset><legend>正在与<strong style="color:#F00;"> <*$who.uname*> </strong>的老师对话：<br /><small>[<*$who.detail*>]</small></legend>
        
            <div class="span9">
            <p><a href="/letter/history/group_id/<*$groupid*>/letterid/<*$letterid*>/content/<*$content*>">查看更多&gt;&gt;</a></p>
                <*foreach from=$data item=da*>
                
                <*if $da.role=="teacher"*>
                
                <div class="from">
                    <div class="from">			  			   
                      <*$da.uname*><span style="color:gray;">[<*$da.addtime*>]：</span>
                    </div>
                    <p class="from1 alert alert-error"><*$da.content*></p>
                </div>
                
                <*else*>
                
                <div class="to">
                    <div class="to">			  			   
                      运维<span style="color:gray;">[<*$da.addtime*>]：</span>
                    </div>
                     <p class="to1 alert alert-success"><*$da.content*></p>
                </div>
                
                <*/if*>
                
                <*/foreach*>
            
                <div style="clear:both">
                <div class="tabbable"> 
                <form action='/letter/reply/' method='post' enctype="multipart/form-data">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab1" data-toggle="tab" onclick='cleartab(1)'>文字</a></li>
                        <li><a href="#tab2" data-toggle="tab" onclick='cleartab(2)'>图片</a></li>
                    </ul>
                    <div class="tab-content">
                            <div class="tab-pane active" id="tab1">
                               <textarea id="content" name="content" style="width:645px;height:200px;"></textarea>
                            </div>
                            <div class="tab-pane" id="tab2">
                              <input type='file' name='pic' id='pic'>
                            </div>
                            <div>
                            <input type='hidden' name='lid' value='<*$lid*>'>
                            <input type='hidden' name='tid' value='<*$tid*>'>
                            <input type='hidden' name='classid' value='<*$classid*>'>
                               <input type='submit' id='tj' value='提交'>
                            </div>						
                    </div>
                </form>
                </div>
                </div>
		</fieldset>
	</div>
  </div>
</div> 

<script>
function cleartab(id){
  if(id==1){
    $('#content').val('');
  }else{
    $('#pic').val('');
  }
}
</script>
